#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\PCT.h>

const char*PCTName = "PCT.dat";

static PCT_REC srPCTRec;

static int recordNum;
int	inLoadPCTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(PCT_FILENAME, SIZE_PCT_REC, inRecNumber, (char *) &srPCTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetPCTRec(void)
{
	return &srPCTRec;

}

int	inSavePCTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(PCT_FILENAME, SIZE_PCT_REC, inRecNumber, (char *) &srPCTRec);

	return inRet;
}

int	inGetPCTRecNumber (void)
{
	return recordNum;
}

int	inUpdatePCTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(PCT_FILENAME, SIZE_PCT_REC, recordNum, (char *) &srPCTRec);

	return inRet;
}

void	vdResetPCTRec (void)
{
	memset((void*)&srPCTRec, 0, REC_SIZEOF(srPCTRec));
}

char* szGetRctHdr2(void)
{
	return srPCTRec.szRctHdr2;
}

void vdSetRctHdr2(const char* szRctHdr2)
{
	strNumCopy(srPCTRec.szRctHdr2, szRctHdr2, sizeof(((PCT_REC*)NULL)->szRctHdr2)-1);
}

char* szGetRctHdr3(void)
{
	return srPCTRec.szRctHdr3;
}

void vdSetRctHdr3(const char* szRctHdr3)
{
	strNumCopy(srPCTRec.szRctHdr3, szRctHdr3, sizeof(((PCT_REC*)NULL)->szRctHdr3)-1);
}

char* szGetRctHdr4(void)
{
	return srPCTRec.szRctHdr4;
}

void vdSetRctHdr4(const char* szRctHdr4)
{
	strNumCopy(srPCTRec.szRctHdr4, szRctHdr4, sizeof(((PCT_REC*)NULL)->szRctHdr4)-1);
}

char* szGetRctHdr5(void)
{
	return srPCTRec.szRctHdr5;
}

void vdSetRctHdr5(const char* szRctHdr5)
{
	strNumCopy(srPCTRec.szRctHdr5, szRctHdr5, sizeof(((PCT_REC*)NULL)->szRctHdr5)-1);
}

char* szGetRctFoot1(void)
{
	return srPCTRec.szRctFoot1;
}

void vdSetRctFoot1(const char* szRctFoot1)
{
	strNumCopy(srPCTRec.szRctFoot1, szRctFoot1, sizeof(((PCT_REC*)NULL)->szRctFoot1)-1);
}

char* szGetRctFoot2(void)
{
	return srPCTRec.szRctFoot2;
}

void vdSetRctFoot2(const char* szRctFoot2)
{
	strNumCopy(srPCTRec.szRctFoot2, szRctFoot2, sizeof(((PCT_REC*)NULL)->szRctFoot2)-1);
}

char* szGetRctFoot3(void)
{
	return srPCTRec.szRctFoot3;
}

void vdSetRctFoot3(const char* szRctFoot3)
{
	strNumCopy(srPCTRec.szRctFoot3, szRctFoot3, sizeof(((PCT_REC*)NULL)->szRctFoot3)-1);
}

short inGetPrinterType(void)
{
	return srPCTRec.inPrinterType;
}

void vdSetPrinterType(short inPrinterType)
{
	srPCTRec.inPrinterType = inPrinterType;
}

short inGetP350ColMode(void)
{
	return srPCTRec.inP350ColMode;
}

void vdSetP350ColMode(short inP350ColMode)
{
	srPCTRec.inP350ColMode = inP350ColMode;
}

short inGetCommIndex(void)
{
	return srPCTRec.inCommIndex;
}

void vdSetCommIndex(short inCommIndex)
{
	srPCTRec.inCommIndex = inCommIndex;
}

short inGetPrintOption(void)
{
	return srPCTRec.inPrintOption;
}

void vdSetPrintOption(short inPrintOption)
{
	srPCTRec.inPrintOption = inPrintOption;
}

short inGetCustCopyOption(void)
{
	return srPCTRec.inCustCopyOption;
}

void vdSetCustCopyOption(short inCustCopyOption)
{
	srPCTRec.inCustCopyOption = inCustCopyOption;
}

short inGetPromptBeepDelay(void)
{
	return srPCTRec.inPromptBeepDelay;
}

void vdSetPromptBeepDelay(short inPromptBeepDelay)
{
	srPCTRec.inPromptBeepDelay = inPromptBeepDelay;
}

short inGetP350LinesPerInch(void)
{
	return srPCTRec.inP350LinesPerInch;
}

void vdSetP350LinesPerInch(short inP350LinesPerInch)
{
	srPCTRec.inP350LinesPerInch = inP350LinesPerInch;
}

VS_BOOL fGetPrintDisclaimer(void)
{
	return srPCTRec.fPrintDisclaimer;
}

void vdSetPrintDisclaimer(VS_BOOL fPrintDisclaimer)
{
	srPCTRec.fPrintDisclaimer = fPrintDisclaimer;
}

VS_BOOL fGetOpenTabSLine(void)
{
	return srPCTRec.fOpenTabSLine;
}

void vdSetOpenTabSLine(VS_BOOL fOpenTabSLine)
{
	srPCTRec.fOpenTabSLine = fOpenTabSLine;
}

VS_BOOL fGetClerkSignLine(void)
{
	return srPCTRec.fClerkSignLine;
}

void vdSetClerkSignLine(VS_BOOL fClerkSignLine)
{
	srPCTRec.fClerkSignLine = fClerkSignLine;
}

VS_BOOL fGetEnablePrinter(void)
{
	return srPCTRec.fEnablePrinter;
}

void vdSetEnablePrinter(VS_BOOL fEnablePrinter)
{
	srPCTRec.fEnablePrinter = fEnablePrinter;
}

VS_BOOL fGetPrePrint(void)
{
	return srPCTRec.fPrePrint;
}

void vdSetPrePrint(VS_BOOL fPrePrint)
{
	srPCTRec.fPrePrint = fPrePrint;
}

